{include file="public/header" /}

<div class="page">
    <form id="user_form" method="post">
        <div class="ds-default-table">
            <table>
                <tbody>
                <tr class="noborder">
                    <td class="required w120">{$Think.lang.admin_storedeposit_membername}</td>
                    <td class="vatop rowform">
                        <input type="hidden" name="seller_id" id="seller_id"
                               value="{$store_info.store_id|default='0'}"/>
                        <input id="seller_name" name="seller_name" value="{$store_info.seller_name|default=''}" disabled
                               class="input-txt" type="text" title="">
                        <span class="err"></span>
                        <p class="notic"></p>
                    </td>
                </tr>
                <tr class="noborder" id="tr_memberinfo">
                    <td colspan="2" class="required" id="td_memberinfo">
                        {notempty name="store_info"}
                        {$store_info.seller_name}{$Think.lang.admin_commission_info} {$store_info.commission}%
                        {/notempty}
                    </td>
                </tr>
                <tr>
                    <td class="required w120">{$Think.lang.commission_value}</td>
                    <td class="vatop rowform">
                        <input type="text" class="form-control" name="commission_value" id="commission_value" value=""/>
                    </td>
                </tr>
                </tbody>
                <tfoot>
                <tr class="tfoot">
                    <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
                </tr>
                </tfoot>
            </table>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        $('#user_form').validate({
            errorPlacement: function (error, element) {
                error.appendTo(element.parent().parent().find('td:last'));
            },
            rules: {
                commission_value: {
                    required: true,
                    range: [0, 100]
                },
                seller_id: {
                    required: true
                }
            },
            messages: {
                commission_value: {
                    required: '{$Think.lang.commission_value_notnull}',
                    range: '{$Think.lang.commission_value_notgt0_andlt100}'
                }
            }
        });
    });
</script>
</body>